package com.neuedu.opp02;

public class Company {

    ColaEmployee emp;

    /**
     * 空参构造
     */
    public Company() {
    }

    public Company(ColaEmployee emp) {
        this.emp = emp;
    }

    /**
     * 获取员工当月工资的方法
     * @param emp 员工信息
     * @param month 月份
     */
    public void printSal(ColaEmployee emp ,int month){
        double salary = emp.getSalary(month);
        System.out.println("员工"+emp.getName()+month+"月的工资为"+salary);
    }

    public void printSal(int month){
        double salary = this.emp.getSalary(month);
        System.out.println("员工"+this.emp.getName()+month+"月的工资为"+salary);
    }
}
